
<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>markdown</title>
    <link href="css/bootstrap.min.css" rel="stylesheet"
    <link href="carousel.css" rel="stylesheet">
	<script src="js/jquery-3.2.1.min.js"></script>
	<script src="common/bootstrap.min.js"></script>
	<script src="js/marked.min.js"></script>
	
	 <style>
	        #header{
	            width: 100%;
	            height: 40px;
	            background: #2e6da4;
	            line-height: 40px;
	            color: white;
	            font-size: 20px;
	            margin-bottom: 60px;
	        }
	        #md,#html{
	            height: 510px;
	        }
	        #md{
	            resize: none;
	        }
	        #html{
	            border: solid 1px darkgrey;
	            border-radius: 5px;
	        }
	    </style>
  </head>
  <body>

<div id="header" class="text-center">MarkDown解析器</div>
<div class="container">
    <div class="row">
        <div class="col-sm-6 col-lg-6 col-md-6">
            <textarea id="md" class="form-control"  placeholder="请输入Markdown代码"></textarea>
        </div>
        <div id="html" class="col-lg-6 col-sm-6 col-md-6"></div>
    </div>
</div>
</body>
<script>
    $("#md").on("keyup blur",function () {
        $('#html').html(marked($("#md").val()))
    })
</script>

  </body>
</html>
